﻿<phone:PhoneApplicationPage
    x:Class="GNP.DetailPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    d:DataContext="{Binding Main.Categories[0].Items[1],Source={StaticResource Locator}}"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot est la grille racine où tout le contenu de la page est placé-->
    <Grid x:Name="LayoutRoot"  >
        <Grid.Background>
            <SolidColorBrush Color="#FF616161" />
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contient le nom de l'application et le titre de la page-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!--ContentPanel - placez tout contenu supplémentaire ici-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer>
                <StackPanel >
                    <TextBlock Text="{Binding Title}" FontSize="25" Margin="10" TextWrapping="Wrap" FontFamily="Segoe UI Bold" />
                    <Border BorderBrush="White" BorderThickness="10" Height="Auto" MaxHeight="330" MaxWidth="400" > 
                        <Image Source="{Binding ImageLink}" MaxWidth="400" MaxHeight="330"/>
                    </Border>
                    <TextBlock Text="{Binding Content}" Margin="10" TextWrapping="Wrap" />
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar>
            <shell:ApplicationBarIconButton IconUri="/Assets/AppBar/back.png" Text="Precedant" Click="ApplicationBarIconButton_LeftClick" />
            <shell:ApplicationBarIconButton IconUri="/Assets/AppBar/next.png" Text="Suivant" Click="ApplicationBarIconButton_RightClick" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>